package com.anxin.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.anxin.bean.Department;
import com.anxin.dao.DepartmentDAO;
import com.anxin.service.DepartmentService;

@Service("departmentService")
public class DepartmentServiceImpl implements DepartmentService {

	@Autowired
	private DepartmentDAO departmentDao;

	public Department findById(Integer id) {
		return departmentDao.findById(Department.class, id);
	}

	public List<Department> findAll() {
		return departmentDao.findAll(Department.class);
	}
}
